﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Insurance.ReadCard;
using Newtonsoft.Json;
using WebSocketSharp;
using WebSocketSharp.Server;

namespace EyFramework.SocketServer
{
    /**
     * 调用市民卡相关交易封装
     */

    public class MisposBehavior : WebSocketBehavior
    {
        protected override void OnMessage(MessageEventArgs e)
        {
            string inData = e.Data;
            var cardFormat = ReadCardService.ReadVirtualCard();
            Send(JsonConvert.SerializeObject(cardFormat));
        }
    }
}